<?php if ($pager->haveToPaginate()): ?>
        <!-- Pagination -->
        <div style="clear: both"></div>
    <div style="padding-top: 10px; padding-bottom:10px; clear: both;">
        <div class="topic_pagination pagination">
            <ul>
                <li class="first <?php echo $pager->getPage() == 1 ? "disabled" : NULL?>">
              <a href="<?php echo url_for('show_topic_page', array('id' => $ktd_topic->getId(),
                                                                'title_slug' => $ktd_topic->getTitleSlug(),
                                                                'page' => 1))?>"><<</a>
              </li>
              <?php if($pager->getPage() > 1):?>
              <li class="prev">
                <a href="<?php echo url_for('show_topic_page', array('id' => $ktd_topic->getId(),
                                                                'title_slug' => $ktd_topic->getTitleSlug(),
                                                                'page' => $pager->getPage() - 1)) ?>"><</a>
              </li>
              <?php endif; ?>
              <?php foreach ($pager->getLinks() as $page): ?>
                <li <?php echo $page == $pager->getPage() ? 'class="disabled"': NULL?>>
                <a href="<?php echo url_for('show_topic_page', array('id' => $ktd_topic->getId(),
                                                                'title_slug' => $ktd_topic->getTitleSlug(),
                                                                'page' => $page)) ?>"><?php echo $page ?></a>
                </li>
            <?php endforeach; ?>
            <?php if($pager->getPage() < count($pager->getLinks())):?>
                <li class="next">
                <a href="<?php echo url_for('show_topic_page', array('id' => $ktd_topic->getId(),
                                                                'title_slug' => $ktd_topic->getTitleSlug(),
                                                                'page' => $pager->getPage() + 1)) ?>">></a>
                </li>
              <?php endif; ?>
                <li class="last <?php echo $pager->getPage() == count($pager->getLinks()) ? "disabled" : NULL?>">
                    <a href="<?php echo url_for('show_topic_page', array('id' => $ktd_topic->getId(),
                                                                'title_slug' => $ktd_topic->getTitleSlug(),
                                                                'page' => $pager->getLastPage()))?>">>></a>
                </li>
        </ul>
        </div>
    </div>
        <div style="clear: both"></div>
        <!-- Fin de Pagination -->
<?php endif ?>

